import request from '@/utils/request'


export function addApplyForList(data) { //立项申请-列表
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/page',
        method: 'post',
        data
    })
}
export function addApplyForAppList(data) { //立项申请-列表
    return request({
        url: '/maintenance-management/api/process/audit/approval/page',
        method: 'post',
        data
    })
}
export function addApplyForListAll(data) { //立项申请-列表
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/wx/all',
        method: 'post',
        data
    })
}
export function addApplyForAdd(data) { //立项申请-添加
    return request({
        url: '/maintenance-management/api/maintenance/project/approval',
        method: 'POST',
        data
    })
}
export function addApplyForEdit(data) { //立项申请-修改
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/put',
        method: 'post',
        data
    })
}
export function addApplyForUp(data) { //立项申请-下拉列表
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/lx/list',
        method: 'post',
        data
    })
}
export function addApplyForDetail(id) { //立项申请-单条查询
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/' + id,
        method: 'get',
    })
}
export function addApplyForDelete(id) { //立项申请-单条查询删除
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/del/' + id,
        method: 'get',
    })
}

export function deptList() { //查询二级分公司包含自己公司
    return request({
        url: '/sys-center/api/system/dept',
        method: 'get'
    })
}
export function addApplyForContractList(data) { //创建合同查合同编号
    return request({
        url: '/maintenance-management/api/contractManagementRecord/contractManagementRecord',
        method: 'post',
        data,
    })
}
export function addApplyForSave(data) { //合同编号 保存
    return request({
        url: '/maintenance-management/api/contractManagementRecord/edit',
        method: 'post',
        data,
    })
}
export function contractRelated(data) { //立项关联合同
    return request({
        url: '/maintenance-management/api/contractManagementRecord/contractInfo/link',
        method: 'post',
        data,
    })
}
export function addApplyForSaveSubmit(data) { //合同编号 保存并提交
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/commit',
        method: 'post',
        data,
    })
}
export const addApplyForExport = (data) => { //导出
    return request.request({
      url: '/maintenance-management/api/maintenance/project/approval/detail/export',
      responseType: 'arraybuffer',
      method: 'post',
      data,
    })
  }
  export const addApplyForExportAll = (data) => { //导出全部
    return request.request({
      url: '/maintenance-management/api/maintenance/project/approval/export',
      responseType: 'arraybuffer',
      method: 'post',
      data,
    })
  }
  
  
export function addApplyForReturn(data) { //立项审批退回
    return request({
        url: '/maintenance-management/api/maintenance/project/approval/rollback',
        method: 'post',
        data,
    })
}


